package message;

import java.nio.ByteBuffer;
import java.util.function.Consumer;

public class EmptyMessageBuilder implements MessageBuilder {

	private Consumer<? super Object> callback;
	
	public EmptyMessageBuilder(Consumer<? super Object> callback) {
		this.callback = callback;
	}

	@Override
	public boolean read(ByteBuffer byteBuffer) {
		this.callback.accept(null);
		return true;
	}
	
}
